package com.icode.service.house;

import com.icode.core.dto.house.*;
import com.icode.core.dto.manager.AssignmentDTO;
import com.icode.core.model.house.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: SunKai
 * Date: 14-11-5
 * Time: 上午10:45
 * To change this template use File | Settings | File Templates.
 */
public interface HouseService {
    void saveOrUpdateEquipment(EquipmentDTO equipmentDTO, EquipmentType type);

    List<EquipmentDTO> getEquipmentDTOs(EquipmentType type);

    EquipmentDTO getEquipmentByGuid(String guid);

    void deleteEquipmentByGuid(String guid);

    void saveOrUpdateHouse(HouseInfoDTO houseInfoDTO);

    List<HouseInfoDTO> getHouseInfoDTOs();

    HouseInfoDTO findHouseInfoByBuildingTypeGuid(String buildingTypeGuid);

    byte[] getImageByGuid(String guid);

    void saveOrUpdateBuildingType(BuildingTypeDTO buildingTypeDTO) throws IOException;

    List<BuildingTypeDTO> getBuildingTypeDTOsByBaseGuid(String baseGuid);

    HouseInfoDTO getHouseInfoByGuid(String guid);

    HouseWeekDTO findHouseWeekByGuid(String guid);

    void saveOrUpdateHouseBase(HouseBaseDTO houseBaseDTO);

    void saveOrUpdateHouseBaseByGuid(HouseBaseDTO houseBaseDTO, String guid);

    List<HouseBaseDTO> findHouseBase(String currentPage);

    List<HouseBaseDTO> findAllHouseBase(String type);

    List<HouseBaseDTO> findAllApartment();

    Object findTotalPage(Class clazz);

    HouseBaseDTO findHouseBaseByGuid(String guid);

    void deleteHouseBaseImage(HouseBaseDTO houseBaseDTO);

    void deleteHouseBaseByGuid(String guid);

    void deleteUploadImageByGuid(String guid);

    List<BuildingType> findBuildingTypeByHouseBase(String guid);

    List<HouseBase> findHouseBaseByTitle(String title);

    List<HouseBaseImage> findHouseBaseImageByHouseBaseId(String houseBaseId);

    List<HouseBaseDTO> findHouseBaseByMoreCondition(String area, String price, String theme, String productType);

    BuildingTypeDTO findBuildingTypeDTOByGuid(String buildingTypeGuid);

    void deleteBuildingTypeImageByGuid(String imageGuid);

    void deleteBuildingTypeByGuid(String buildingTypeGuid);

    List<HouseBaseDTO> loadByParam(HouseParamDTO houseParamDTO);

    void saveOrUpdateBannerForApp(BannerForAppDTO bannerForAppDTO);

    BannerForApp findBannerForApps();

    void deleteFirstBanner(String guid);

    void upDataBannerForApp(BannerForAppDTO bannerForAppDTO);

    void deleteImageForBanner(String imgGuid);

    void saveOrUpdateAgreement(AgreementDTO agreementDTO);

    List<AgreementDTO> getAgreementDTOs();

    AgreementDTO getAgreementDTOByGuid(String agreementGuid);

    AgreementDTO getAgreementDTOByHouseInfoDTO(HouseInfoDTO houseInfoDTO);

    Object findTotalPageByStatus(Class clazz, String status);

    void sort(int sort, String guid);

    void deleteUploadImageByGuidForHouseInfo(String imgGuid);

    void deleteUploadHouseExtraFeeByGuid(String guid);

    List<HouseInfoDTO> houseInfoNoWeekTime();

    List<HouseInfoDTO> getHouseInfoDTOsHaveWeek();

    List<HouseInfoDTO> findhouseInfoByhouseBaseArea(String houseBaseArea);

    AssignmentDTO getAssignmentDTO(String assignmentguid);

    Object updataEquipment(String guid, String name);

    Equipment addEquipment(String name, String type);

    String saveOrUpdateImage(MultipartFile filename);
}
